define(() => {
    return function (goodsMsg, that) {
        goodsMsg.forEach(val => {
            val.check = that.checked
        })
        localStorage.setItem("goodsMsg", JSON.stringify(goodsMsg));
        for (let i = 0; i < $(".check").length; i++) {
            $(".check")[i].checked = that.checked
        }
    }
})